import request from '@/utils/request'
export function getClassList({ page, keyword }) {
  return request({
    url: '/admin/course/lists',
    method: 'get',
    params: { page, keyword }
  })
}
export function addOrEditClassChapter({ id, course_name, course_price, course_sale_num, course_cover, course_content }) {
  return request({
    url: '/admin/course/addUpdateCourse',
    method: 'post',
    params: { id, course_name, course_price, course_sale_num, course_cover, course_content }
  })
}
export function editClassNameOrPrice({ id, course_name, course_price }) {
  return request({
    url: '/admin/course/updateCourse',
    method: 'post',
    data: { id, course_name, course_price }
  })
}
export function getCourseDetail(id) {
  return request({
    url: '/admin/course/getCourse',
    method: 'get',
    params: { id }
  })
}
export function deleteClass(id) {
  return request({
    url: '/admin/course/deleteCourse',
    method: 'post',
    data: { id }
  })
}

